home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / fmt.h,v < prev    next >
Encoding:
Text File  |  1991-11-03  |  3.9 KB  |  203 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.5.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     90.09.11.14.40.17;  author kupfer;  state Exp;
  11. branches 1.5.1.1;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     90.07.24.15.57.34;  author shirriff;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     90.02.20.18.14.20;  author brent;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     89.10.12.12.14.19;  author jhh;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     89.06.05.12.35.22;  author jhh;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34. 1.5.1.1
  35. date     91.11.03.14.50.20;  author kupfer;  state Exp;
  36. branches ;
  37. next     ;
  38.  
  39.  
  40. desc
  41. @@
  42.  
  43.  
  44. 1.5
  45. log
  46. @Use function prototypes.
  47. @
  48. text
  49. @/*
  50.  * fmt.h --
  51.  *
  52.  *    Declarations for the Fmt package.
  53.  *
  54.  * Copyright 1989 Regents of the University of California
  55.  * Permission to use, copy, modify, and distribute this
  56.  * software and its documentation for any purpose and without
  57.  * fee is hereby granted, provided that the above copyright
  58.  * notice appear in all copies.  The University of California
  59.  * makes no representations about the suitability of this
  60.  * software for any purpose.  It is provided "as is" without
  61.  * express or implied warranty.
  62.  *
  63.  * $Header: /sprite/src/lib/include/RCS/fmt.h,v 1.4 90/07/24 15:57:34 shirriff Exp Locker: kupfer $ SPRITE (Berkeley)
  64.  */
  65.  
  66. #ifndef _FMT
  67. #define _FMT
  68.  
  69. #include <cfuncproto.h>
  70.  
  71. /*
  72.  * Return values
  73.  */
  74. #define FMT_OK            0
  75. #define FMT_CONTENT_ERROR    1
  76. #define FMT_INPUT_TOO_SMALL    2
  77. #define FMT_OUTPUT_TOO_SMALL    3
  78. #define FMT_ILLEGAL_FORMAT    4
  79.  
  80. /*
  81.  * Different data formats.
  82.  */
  83. typedef int Fmt_Format;
  84.  
  85. /*
  86.  * For now we or in a high bit so we can be backwards compatible with
  87.  * Swap_Buffer constants. Later on we'll get rid of this.
  88.  */
  89.  
  90. #define FMT_68K_FORMAT        ((Fmt_Format) 0x1000 | 1)
  91. #define FMT_VAX_FORMAT        ((Fmt_Format) 0x1000 | 2)
  92. #define FMT_SPUR_FORMAT        ((Fmt_Format) 0x1000 | 3)
  93. #define FMT_MIPS_FORMAT        ((Fmt_Format) 0x1000 | 4)
  94. #define FMT_SPARC_FORMAT    ((Fmt_Format) 0x1000 | 5)
  95. #define FMT_SYM_FORMAT        ((Fmt_Format) 0x1000 | 6)
  96.  
  97. /*
  98.  * Define FMT_MY_FORMAT to be the "native" format
  99.  */
  100. #if defined(sun3) || defined(sun2)
  101. #define FMT_MY_FORMAT    FMT_68K_FORMAT
  102. #endif
  103. #if defined(sun4)
  104. #define FMT_MY_FORMAT    FMT_SPARC_FORMAT
  105. #endif
  106. #if defined(ds3100) || defined(mips)
  107. #define FMT_MY_FORMAT    FMT_MIPS_FORMAT
  108. #endif
  109. #if defined(spur)
  110. #define FMT_MY_FORMAT    FMT_SPUR_FORMAT
  111. #endif
  112. #if defined(vax)
  113. #define FMT_MY_FORMAT    FMT_VAX_FORMAT
  114. #endif
  115. #if defined(sequent)
  116. #define FMT_MY_FORMAT    FMT_SYM_FORMAT
  117. #endif
  118.  
  119. /* procedures */
  120.  
  121. extern int Fmt_Convert _ARGS_((char *contents, Fmt_Format inFormat,
  122.                    int *inSizePtr, char *inBuf,
  123.                    Fmt_Format outFormat, int *outSizePtr,
  124.                    char *outBuf));
  125. extern int Fmt_Size _ARGS_((char *contents, Fmt_Format inFormat,
  126.                 int *inSizePtr, Fmt_Format outFormat,
  127.                 int *outSizePtr));
  128.  
  129. #endif /* _FMT */
  130.  
  131. @
  132.  
  133.  
  134. 1.5.1.1
  135. log
  136. @Initial branch for Sprite server.
  137. @
  138. text
  139. @d15 1
  140. a15 1
  141.  * $Header: /sprite/src/lib/include/RCS/fmt.h,v 1.5 90/09/11 14:40:17 kupfer Exp $ SPRITE (Berkeley)
  142. @
  143.  
  144.  
  145. 1.4
  146. log
  147. @Sequent format information added.
  148. @
  149. text
  150. @d15 1
  151. a15 1
  152.  * $Header: /sprite/src/lib/include/RCS/fmt.h,v 1.3 90/02/20 18:14:20 brent Exp $ SPRITE (Berkeley)
  153. d21 2
  154. d73 7
  155. a79 2
  156. extern int    Fmt_Convert();
  157. extern int    Fmt_Size();
  158. @
  159.  
  160.  
  161. 1.3
  162. log
  163. @Added FMT_MY_FORMAT
  164. @
  165. text
  166. @d15 1
  167. a15 1
  168.  * $Header: /sprite/src/lib/include/RCS/fmt.h,v 1.2 89/10/12 12:14:19 jhh Exp Locker: brent $ SPRITE (Berkeley)
  169. d45 1
  170. d64 3
  171. @
  172.  
  173.  
  174. 1.2
  175. log
  176. @made format constants different to allow backwards compatiblity in 
  177. the kernels.
  178. @
  179. text
  180. @d15 1
  181. a15 1
  182.  * $Header: /sprite/src/lib/include/RCS/fmt.h,v 1.1 89/06/05 12:35:22 jhh Exp $ SPRITE (Berkeley)
  183. d45 19
  184. @
  185.  
  186.  
  187. 1.1
  188. log
  189. @Initial revision
  190. @
  191. text
  192. @d15 1
  193. a15 1
  194.  * $Header: /sprite/lib/forms/RCS/proto.h,v 1.2 89/01/07 04:12:44 rab Exp $ SPRITE (Berkeley)
  195. d35 10
  196. a44 5
  197. #define FMT_68K_FORMAT        ((Fmt_Format) 1)
  198. #define FMT_VAX_FORMAT        ((Fmt_Format) 2)
  199. #define FMT_SPUR_FORMAT        ((Fmt_Format) 3)
  200. #define FMT_MIPS_FORMAT        ((Fmt_Format) 4)
  201. #define FMT_SPARC_FORMAT    ((Fmt_Format) 5)
  202. @
  203.